﻿using System;

namespace DMS.Web.Common.Controls
{
    public partial class FormActionTitle : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request["ActionName"]))
                {
                    this.ltlAction.Text = Request["ActionName"].ToString();
                }
                else if (!string.IsNullOrEmpty(Request["Action"]))
                {
                    string action = Request["Action"].ToString().ToUpper();
                    if (action == "VIEW" || action == "DEATAIL")
                    {
                        this.ltlAction.Text = "查看";
                    }
                    else if (action == "EDIT" || action == "MODIFY")
                    {
                        this.ltlAction.Text = "编辑";
                    }
                    else if (action == "ADD" || action == "NEW" || action == "CREATE")
                    {
                        this.ltlAction.Text = "新增";
                    }
                }
            }
        }
    }
}